import 'package:flutter_utils/flutter_utils.dart';
import 'package:from_css_color/from_css_color.dart';

import '../config/com_header.dart';

class TransparentContain extends StatelessWidget {
  final Widget child;
  final double? width;
  final double? height;
  const TransparentContain(
      {super.key, required this.child, this.width, this.height});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: width,
      height: height,
      padding: EdgeInsets.all(24.ratio),
      decoration: BoxDecoration(
          gradient: LinearGradient(
            colors: [
              fromCssColor('#7899C3').withOpacity(0.1),
              fromCssColor('#2E4277').withOpacity(0.4),
            ],
          ),
          borderRadius: BorderRadius.circular(14.ratio),
          boxShadow: [
            BoxShadow(
              color: fromCssColor('#7899C3').withOpacity(0.1),
              blurRadius: 2.ratio,
            )
          ]),
      child: child,
    );
  }
}
